package com.mystery.service.impl;

import com.mystery.mapper.OrderMapper;
import com.mystery.pojo.Order;
import com.mystery.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderServiceImpl implements OrderService {

    @Autowired
    private OrderMapper orderMapper;

    @Override
    public void paid(Long id) {
         orderMapper.paid(id);
    }

    @Override
    public void add(long userId, String username, long fitnessId, String fitnessName, long orderNumber) {
        orderMapper.add(userId,username,fitnessId,fitnessName,orderNumber);
    }

    @Override
    public void update(long id, String evaluate) {
        orderMapper.update(id,evaluate);
    }

    @Override
    public List<Order> find(Long userId) {
        return orderMapper.find(userId);
    }

    @Override
    public List<Order> queryAll(Long userId) {
        return orderMapper.queryAll(userId);
    }

    @Override
    public List<Order> query(Long userId,String fitnessName) {
        return orderMapper.query(userId,fitnessName);
    }
}
